package cn.tedu.review;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

public class TestAnnotation {

}
@Target({ElementType.TYPE,ElementType.FIELD})
@Retention(RetentionPolicy.CLASS)
@interface Rice{
    char gender()default '男';
    String value()default "张三";
}
@Rice(gender ='男',value="张三")
class TestAnno{
    //@Rice(gender='女')
    @Rice("李四")
    String kind;
    public void eat(){
        System.out.println("eat()");
    }
}